﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Forms
{
    // 假设这是你的全局变量
    public static class FlashVariables
    {
        public static event EventHandler FlashVariableChanged;

        private static int _globalVariable;

        public static int GlobalVariable
        {
            get { return _globalVariable; }
            set
            {
                if (_globalVariable != value)
                {
                    _globalVariable = value;
                    OnGlobalVariableChanged();
                }
            }
        }

        private static void OnGlobalVariableChanged()
        {
            FlashVariableChanged?.Invoke(null, EventArgs.Empty);
        }
    }
}
